documented GtkBinding*, #358329.
authorTim Janik <timj@imendio.com>
Tue, 10 Oct 2006 13:30:55 +0000 (13:30 +0000)
committerTim Janik <timj@src.gnome.org>
Tue, 10 Oct 2006 13:30:55 +0000 (13:30 +0000)
Tue Oct 10 15:29:15 2006  Tim Janik  <timj@imendio.com>

        * gtk/tmpl/gtkbindings.sgml: documented GtkBinding*, #358329.

docs/reference/ChangeLog
docs/reference/gdk/tmpl/pango_interaction.sgml
docs/reference/gdk/tmpl/windows.sgml
docs/reference/gtk/tmpl/gtkarrow.sgml
docs/reference/gtk/tmpl/gtkbindings.sgml
docs/reference/gtk/tmpl/gtkcellrenderertext.sgml
docs/reference/gtk/tmpl/gtkprogressbar.sgml
docs/reference/gtk/tmpl/gtkrc.sgml
docs/reference/gtk/tmpl/gtksettings.sgml

index 3af517dddc2b0029b04d0a35b523d3d7cc15baf4..9caa396e7f6f162504c3f8cd789658134f103ff6 100644 (file)
@@ -1,3 +1,7 @@
+Tue Oct 10 15:29:15 2006  Tim Janik  <timj@imendio.com>
+
+       * gtk/tmpl/gtkbindings.sgml: documented GtkBinding*, #358329.
+
 2006-09-22  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/tmpl/gtkpagesetup.sgml: Apply a patch
index 11853dd4b65ddff758ee18d87847771bdd552308..a736659c885478ec68fef07c055cdfed09d04d28 100644 (file)
@@ -249,6 +249,15 @@ rendering the text.
 @attr: the #PangoAttribute.
 @stipple: the stipple bitmap.
 
+<!-- ##### FUNCTION gdk_pango_attr_emboss_color_new ##### -->
+<para>
+
+</para>
+
+@color: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gdk_pango_attr_embossed_new ##### -->
 <para>
 
index 05647b6160d228394b1ecda0abde367a90ee8d13..3d79c6c5fcd611ae7c3b66fa3cbcc3eb90b73bdb 100644 (file)
@@ -638,6 +638,14 @@ Registers a window as a potential drop destination.
 @new_height: 
 
 
+<!-- ##### FUNCTION gdk_window_beep ##### -->
+<para>
+
+</para>
+
+@window: 
+
+
 <!-- ##### FUNCTION gdk_window_begin_paint_rect ##### -->
 <para>
 
index 3e2e2713cdca304fc9165969fae98d57cd40f626..8e3a146aab9c8d67a68dad60063d491b581c57d7 100644 (file)
@@ -55,6 +55,11 @@ an application.)
 \r
 </para>
 
+<!-- ##### ARG GtkArrow:arrow-scaling ##### -->
+<para>
+
+</para>
+
 <!-- ##### FUNCTION gtk_arrow_new ##### -->
 <para>\r
 Creates a new arrow widget.\r
index a96b0b543a729395fc04d6ebfd8eba67aa413c3c..e1f08faa8ebdcea219d4d770524c793d15d7b179 100644 (file)
@@ -6,12 +6,108 @@ Key bindings for individual widgets
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
+GtkBinding provide a mechanism for configuring Gtk+ key bindings through RC files.
+This eases key binding adjustments for application developers as well as users and
+provides Gtk+ users or administrators with high key binding configurability which
+require no application or toolkit side changes.
+</para>
+
+<refsect2>
+<anchor id="gtk-bindings-install"/>
+<title>Installing a key binding</title>
+
+<para>
+A resource file binding consists of a 'binding' definition and a match statement to
+apply the binding to specific widget types. Details on the matching mechanism are
+described under <link linkend="gtkrc-pathnames-and-patterns">Pathnames and patterns</link>.
+Inside the binding definition, key combinations are bound to specific signal emissions
+on the target widget. Key combinations are strings consisting of an optional #GdkModifierType
+name and <link linkend="gdk-Keyboard-Handling">key names</link> such as those defined in
+<filename>&lt;gdk/gdkkeysyms.h&gt;</filename> or returned from gdk_keyval_name(), they have
+to be parsable by gtk_accelerator_parse().
+Specifications of signal emissions consist of a string identifying the signal name, and
+a list of signal specific arguments in parenthesis.
+
+For example for binding Control and the left or right cursor keys of a #GtkEntry widget to the
+#GtkEntry::move-cursor signal, so movement occurs in 3 letter steps,
+the following binding can be used:
+
+<informalexample><programlisting>
+binding "MoveCursor3" {
+  bind "&lt;Control&gt;Right" {
+    "move-cursor" (visual-positions, 3, 0)
+  }
+  bind "&lt;Control&gt;Left" {
+    "move-cursor" (visual-positions, -3, 0)
+  }
+}
+class "GtkEntry" binding "MoveCursor3"
+</programlisting></informalexample>
+</para>
+
+
+<anchor id="gtk-bindings-unbind"/>
+<title>Unbinding existing key bindings</title>
+<para>
+Gtk+ already defines a number of useful bindings for the widgets it provides.
+Because custom bindings set up in RC files take precedence over the default bindings
+shipped with Gtk+, overriding existing bindings as demonstrated in 
+<link linkend="gtk-bindings-install">Installing a key binding</link>
+works as expected. The same mechanism can not be used to "unbind" existing bindings,
+however.
+
+<informalexample><programlisting>
+binding "MoveCursor3" {
+  bind "&lt;Control&gt;Right" { }
+  bind "&lt;Control&gt;Left" { }
+}
+class "GtkEntry" binding "MoveCursor3"
+</programlisting></informalexample>
+
+The above example will not have the desired effect of causing "&lt;Control&gt;Right"
+and "&lt;Control&gt;Left" key presses to be ignored by Gtk+. Instead, it just causes
+any existing bindings from the bindings set "MoveCursor3" to be deleted, so when
+"&lt;Control&gt;Right" or "&lt;Control&gt;Left" are pressed, no binding for these keys
+is found in binding set "MoveCursor3". Gtk+ will thusly continue to search for matching
+key bindings, and will eventually lookup and find the default Gtk+ bindings for entries
+which implement word movement. To keep Gtk+ from activating its default bindings, the
+"unbind" keyword can be used like this:
+
+<informalexample><programlisting>
+binding "MoveCursor3" {
+  unbind "&lt;Control&gt;Right"
+  unbind "&lt;Control&gt;Left"
+}
+class "GtkEntry" binding "MoveCursor3"
+</programlisting></informalexample>
+
+Now, Gtk+ will find a match when looking up "&lt;Control&gt;Right" and "&lt;Control&gt;Left"
+key presses before it resorts to its default bindings, and the match instructs it to abort
+("unbind") the search, so the key presses are not consumed by this widget. 
+As usual, further processing of the key presses, e.g. by an entries parent widget,
+is now possible.
 
 </para>
 
+</refsect2>
+
 <!-- ##### SECTION See_Also ##### -->
 <para>
+<variablelist>
+
+<varlistentry>
+<term><link linkend="gtk-keyboard-accelerators">Keyboard Accelerators</link>
+</term>
+<listitem><para>installing and using keyboard short-cuts.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><link linkend="Resource-Files">Resource Files</link>
+</term>
+<listitem><para>Gtk+ Resource Files - behavior and style definitions.</para></listitem>
+</varlistentry>
 
+</variablelist>
 </para>
 
 <!-- ##### SECTION Stability_Level ##### -->
@@ -19,90 +115,101 @@ Key bindings for individual widgets
 
 <!-- ##### STRUCT GtkBindingSet ##### -->
 <para>
-
+A binding set maintains a list of activatable key bindings.
+A single binding set can match multiple types of widgets.
+Similar to styles, widgets can be mapped by widget name paths, widget class paths or widget class types.
+When a binding within a set is matched upon activation, an action signal is emitted on
+the target widget to carry out the actual activation.
 </para>
 
-@set_name: 
-@priority: 
-@widget_path_pspecs: 
-@widget_class_pspecs: 
-@class_branch_pspecs: 
-@entries: 
-@current: 
-@parsed: 
+@set_name:             unique binding set name
+@priority:             unused
+@widget_path_pspecs:   widgets matched by path that this binding set applies to
+@widget_class_pspecs:  widgets matched by class path that this binding set applies to
+@class_branch_pspecs:  widgets matched by class that this binding set applies to
+@entries:              the key binding entries in this binding set
+@current:              implementation detail
+@parsed:               whether this binding set stems from an RC file and is reset upon theme changes
 
 <!-- ##### STRUCT GtkBindingEntry ##### -->
 <para>
-
+Each key binding element of a binding sets binding list is represented by a #GtkBindingEntry.
 </para>
 
-@keyval: 
-@modifiers: 
-@binding_set: 
-@destroyed: 
-@in_emission: 
-@set_next: 
-@hash_next: 
-@signals: 
+@keyval:       key value to match
+@modifiers:    key modifier to match
+@binding_set:  binding set this entry belongs to
+@destroyed:    implementation detail
+@in_emission:  implementation detail
+@set_next:     linked list of entries maintained by binding set
+@hash_next:    implementation detail
+@signals:      action signals of this entry
 
 <!-- ##### STRUCT GtkBindingSignal ##### -->
 <para>
-
+A #GtkBindingSignal stores the necessary information to activate a widget
+in response to a key press via a signal emission.
 </para>
 
-@next: 
-@signal_name: 
-@n_args: 
-@args: 
+@next:                 implementation detail
+@signal_name:  the action signal to be emitted
+@n_args:       number of arguments specified for the signal
+@args:                 the arguments specified for the signal
 
 <!-- ##### STRUCT GtkBindingArg ##### -->
 <para>
-
+A #GtkBindingArg holds the data associated with an argument for a
+key binding signal emission as stored in #GtkBindingSignal.
 </para>
 
-@arg_type: 
+@arg_type: implementation detail
 
 <!-- ##### FUNCTION gtk_binding_set_new ##### -->
 <para>
-
+Gtk+ maintains a global list of binding sets. Each binding set has a unique name
+which needs to be specified upon creation.
 </para>
 
-@set_name: 
-@Returns: 
+@set_name: unique name of this binding set
+@Returns:  new binding set
 
 
 <!-- ##### FUNCTION gtk_binding_set_by_class ##### -->
 <para>
-
+This function returns the binding set named after the type name of the passed
+in class structure. New binding sets are created on demand by this function.
 </para>
 
-@object_class: 
-@Returns: 
+@object_class: a valid #GtkObject class
+@Returns:      the binding set corresponding to @object_class
 
 
 <!-- ##### FUNCTION gtk_binding_set_find ##### -->
 <para>
-
+Find a binding set by its globally unique name.
+The @set_name can either be a name used for gtk_binding_set_new() or the
+type name of a class used in gtk_binding_set_by_class().
 </para>
 
-@set_name: 
-@Returns: 
+@set_name: unique binding set name
+@Returns:  %NULL or the specified binding set
 
 
 <!-- ##### FUNCTION gtk_bindings_activate ##### -->
 <para>
-
+Find a key binding matching @keyval and @modifiers and activate the binding
+on @object.
 </para>
 
-@object: 
-@keyval: 
-@modifiers: 
-@Returns: 
+@object:       object to activate when binding found
+@keyval:       key value of the binding
+@modifiers:    key modifier of the binding
+@Returns:      %TRUE if a binding was found and activated
 
 
 <!-- ##### FUNCTION gtk_bindings_activate_event ##### -->
 <para>
-
+<!-- documented inline -->
 </para>
 
 @object: 
@@ -112,26 +219,27 @@ Key bindings for individual widgets
 
 <!-- ##### FUNCTION gtk_binding_set_activate ##### -->
 <para>
-
+Find a key binding matching @keyval and @modifiers within @binding_set
+ and activate the binding on @object.
 </para>
 
-@binding_set: 
-@keyval: 
-@modifiers: 
-@object: 
-@Returns: 
+@binding_set: the binding set to constrain the search to
+@keyval:       key value of the binding
+@modifiers:    key modifier of the binding
+@object:       object to activate when binding found
+@Returns:      %TRUE if a binding was found and activated
 
 
 <!-- ##### MACRO gtk_binding_entry_add ##### -->
 <para>
-
+Deprecated.
 </para>
 
 
 
 <!-- ##### FUNCTION gtk_binding_entry_clear ##### -->
 <para>
-
+Deprecated as public API, used only internally.
 </para>
 
 @binding_set: 
@@ -141,56 +249,58 @@ Key bindings for individual widgets
 
 <!-- ##### FUNCTION gtk_binding_entry_add_signal ##### -->
 <para>
-
+Override or install new key binding for @keyval with @modifiers on @binding_set.
+When the binding is activated, @signal_name will be emitted on the target widget,
+with @n_args @Varargs used as arguments.
 </para>
 
-@binding_set: 
-@keyval: 
-@modifiers: 
-@signal_name: 
-@n_args: 
-@Varargs: 
+@binding_set:  @binding_set to install an entry for
+@keyval:       key value of binding to install
+@modifiers:    key modifier of binding to install
+@signal_name:  signal to execute upon activation
+@n_args:       number of arguments to @signal_name
+@Varargs:      arguments to @signal_name
 
 
 <!-- ##### FUNCTION gtk_binding_set_add_path ##### -->
 <para>
-
+This function is used internally by the GtkRC parsing mechanism to assign match
+patterns to #GtkBindingSet structures.
 </para>
 
-@binding_set: 
-@path_type: 
-@path_pattern: 
-@priority: 
+@binding_set:  binding set to add a path to
+@path_type:    path type the pattern applies to
+@path_pattern: the actual match pattern
+@priority:     binding priority
 
 
 <!-- ##### FUNCTION gtk_binding_entry_remove ##### -->
 <para>
-
+Remove a binding previously installed via gtk_binding_entry_add_signal() on
+@binding_set.
 </para>
 
-@binding_set: 
-@keyval: 
-@modifiers: 
+@binding_set:  @binding_set to remove an entry of
+@keyval:       key value of binding to remove
+@modifiers:    key modifier of binding to remove
 
 
 <!-- ##### FUNCTION gtk_binding_entry_add_signall ##### -->
 <para>
-
+Deprecated.
 </para>
 
-@binding_set: 
-@keyval: 
-@modifiers: 
-@signal_name: 
-@binding_args: 
+@binding_set:  binding set to add a signal to
+@keyval:       key value
+@modifiers:    key modifier
+@signal_name:  signal name to be bound
+@binding_args: list of #GtkBindingArg signal arguments
 
 
 <!-- ##### FUNCTION gtk_binding_parse_binding ##### -->
 <para>
-
+Deprecated as public API, used only internally.
 </para>
 
-@scanner: 
-@Returns: 
-
-
+@scanner: GtkRC scanner
+@Returns: expected token upon errors
index 026d9db5ccf91fc8a3331ee0ff5c18e584e6af73..42125e4e25326f7566a340255149300503a7183e 100644 (file)
@@ -40,6 +40,11 @@ the #GtkCellRendererText allows to edit its text using an entry.
 @arg1: 
 @arg2: 
 
+<!-- ##### ARG GtkCellRendererText:align-set ##### -->
+<para>
+
+</para>
+
 <!-- ##### ARG GtkCellRendererText:alignment ##### -->
 <para>
 
index df16163c4d8c1000cab2894ae434952a870481d1..5040afa4f29fdf7583385b84f38cedaf42d460d8 100644 (file)
@@ -116,6 +116,16 @@ and should be accessed using the functions below.
 
 </para>
 
+<!-- ##### ARG GtkProgressBar:xspacing ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkProgressBar:yspacing ##### -->
+<para>
+
+</para>
+
 <!-- ##### FUNCTION gtk_progress_bar_new ##### -->
 <para>
 Creates a new #GtkProgressBar.
index 2de798ecc3be45e775ae33961f869621a35b808b..24009cd509e1ffdb4b5f80459c6cfa09ea49bb94 100644 (file)
@@ -45,6 +45,7 @@ and parses the first of those that exists.
 </refsect2>
 
 <refsect2><title>Pathnames and patterns</title>
+<anchor id="gtkrc-pathnames-and-patterns"/>
 <para>
 A resource file defines a number of styles and key bindings and
 attaches them to particular widgets. The attachment is done
index a929e36ce616b168256f2577dc16d653e335c2ac..37726044ae78f78f566f45087acca4d414a7fb69 100644 (file)
@@ -63,6 +63,11 @@ Sharing settings between applications
 
 </para>
 
+<!-- ##### ARG GtkSettings:gtk-cursor-blink-timeout ##### -->
+<para>
+
+</para>
+
 <!-- ##### ARG GtkSettings:gtk-cursor-theme-name ##### -->
 <para>